﻿

if col_length('NewsLetterEmailSent', 'OrderId') is not null
Begin
	alter table dbo.NewsLetterEmailSent alter column OrderId int null
End
Go

if col_length('NewsLetterEmailSent', 'SentStateId') is not null
Begin
	alter table dbo.NewsLetterEmailSent alter column SentStateId int null
End
Go

if col_length('NewsLetterEmailSent', 'NewsLetterId') is not null
Begin
	alter table dbo.NewsLetterEmailSent alter column NewsLetterId int null
End
Go

if col_length('NewsLetterEmailSent', 'EmailRecipientId') is null
Begin
	alter table dbo.NewsLetterEmailSent add EmailRecipientId int null
End
Go